<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>菜鸟教程(runoob.com)</title>
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
	</head>
	<body>

		<div id="log"></div>
		<script>
			$(function() {debugger;
				var object1 = {
					apple: 0,
					banana: {
						weight: 52,
						price: 100
					},
					cherry: 97
				};
				var object2 = {
					banana: {
						price: 200
					},
					durian: 100
				};
				// 将 object2 递归合并到 object1中
				var object3 = $.extend(true, object1, object2);
				// 假设 JSON.stringify - 在 IE版本< 8中无效
				$("#log").append(JSON.stringify(object1));
				$("#log").append(JSON.stringify(object3));
			})
		</script>

	</body>
</html>
